//
// RS Game Framework
// Copyright © 2009 Jedd Haberstro
// jhaberstro@gmail.com
// 
// $Id:
//

#ifndef RS_UNITTEST_TESTCASE_HPP
#define RS_UNITTEST_TESTCASE_HPP

#include "rs/Portability.hpp"
#include "rs/unittest/UnitTestForwards.hpp"

namespace rs
{
    namespace unittest
    {   
        class TestCase
        {
        public:
            
            TestCase(Char const* testName, Char const* suiteName, Char const* fileName, UInt32 lineNumber);
                                                
            void Run(TestRunner* runner);
            
            Char const* GetTestName() const;
            
            Char const* GetSuiteName() const;
            
            Char const* GetFileName() const;
            
            UInt32 GetLineNumber() const;
                        
        protected:
            
            virtual void RunImplementation() = 0;
                                    
        private:
            
            Char const* testName_;
            Char const* suiteName_;
            Char const* fileName_;
            UInt32 lineNumber_;
        };
        
        
        
        inline TestCase::TestCase(Char const* testName, Char const* suiteName, Char const* fileName, UInt32 lineNumber)
        : testName_(testName),
          suiteName_(suiteName),
          fileName_(fileName),
          lineNumber_(lineNumber) {
        }
        
        inline Char const* TestCase::GetTestName() const {
            return testName_;
        }
        
        inline Char const* TestCase::GetSuiteName() const {
            return suiteName_;
        }
        
        inline Char const* TestCase::GetFileName() const {
            return fileName_;
        }
        
        inline UInt32 TestCase::GetLineNumber() const {
            return lineNumber_;
        }
    }
}

#endif // RS_UNITTEST_TESTCASE_HPP
